gboolean opposite_expand;
GtkOrientation opposite_orientation;
- if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
- opposite_orientation = GTK_ORIENTATION_VERTICAL;
- else
- opposite_orientation = GTK_ORIENTATION_HORIZONTAL;
+ opposite_orientation = OPPOSITE_ORIENTATION (private->orientation);
our_expand = FALSE;
opposite_expand = FALSE;
gtk_cell_area_box_cell_layout_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL));
-#define OPPOSITE_ORIENTATION(orientation) \
- ((orientation) == GTK_ORIENTATION_HORIZONTAL ? \
- GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL)
-
static void
gtk_cell_area_box_init (GtkCellAreaBox *box)
{
if (priv->child1 && gtk_widget_get_visible (priv->child1))
{
- _gtk_widget_get_preferred_size_for_size (priv->child1, 1 - priv->orientation, size, &child_min, &child_nat, NULL, NULL);
+ _gtk_widget_get_preferred_size_for_size (priv->child1,
+ OPPOSITE_ORIENTATION (priv->orientation),
+ size,
+ &child_min, &child_nat,
+ NULL, NULL);
*minimum = child_min;
*natural = child_nat;
if (priv->child2 && gtk_widget_get_visible (priv->child2))
{
- _gtk_widget_get_preferred_size_for_size (priv->child2, 1 - priv->orientation, size, &child_min, &child_nat, NULL, NULL);
+ _gtk_widget_get_preferred_size_for_size (priv->child2,
+ OPPOSITE_ORIENTATION (priv->orientation),
+ size,
+ &child_min, &child_nat,
+ NULL, NULL);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
#define GTK_PARAM_WRITABLE G_PARAM_WRITABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
#define GTK_PARAM_READWRITE G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
+#define OPPOSITE_ORIENTATION(_orientation) (1 - (_orientation))
+
#ifdef G_DISABLE_CAST_CHECKS
/* This is true for debug no and minimum */
#define gtk_internal_return_if_fail(__expr) G_STMT_START{ (void)0; }G_STMT_END